'''
Created on Mar 15, 2014

@author: Eric
'''

import os

from tungsten import live_obj
from tungsten import skeleton
from tungsten import domain

#######

class ActionEnum(object):
    
    CHECK_GRAMMAR  = 0
    PARSE_DOMAIN   = 1
    RUN_BLACKBOARD = 2

#######

def run(action):
    os.environ[domain.ROOTS_ENVVAR] = r'C:\Users\Eric\Documents\Aptana Studio 3 Workspace\Tungsten\tungsten\source'
    if action == ActionEnum.CHECK_GRAMMAR:
        skeleton.check_grammar()
    elif action == ActionEnum.PARSE_DOMAIN:
        skeleton.run()
    elif action == ActionEnum.RUN_BLACKBOARD:
        path = 'source.blackboard'
        live_obj.run(path).Main().main()
    else:
        assert False, 'Unrecognized action!'

#######

def main():
    run(ActionEnum.CHECK_GRAMMAR)

#######

if __name__ == '__main__':
    main()

